-- GENERATED SPELL FOR [Raging Soul] --


function spell0_18506(pUnit, Event) --@Greater Invisibility,Self--
pUnit:FullCastSpellOnTarget(32811,pUnit)
pUnit:RegisterEvent('Sorts_18506', 642, 1)
end

function spell1_18506(pUnit, Event) --@Rage,n/a--
pUnit:FullCastSpellOnTarget(32888,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18506', 4500, 1)
end

function spell2_18506(pUnit, Event) --@Rage,n/a--
pUnit:FullCastSpellOnTarget(38380,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18506', 4500, 1)
end

function Sorts_18506(pUnit, Event)
local choix_sorts_18506 = math.random(0, 2)
if choix_sorts_18506 == 0 then
pUnit:RegisterEvent('spell0_18506', 1, 1)
end
if choix_sorts_18506 == 1 then
pUnit:RegisterEvent('spell1_18506', 1, 1)
end
if choix_sorts_18506 == 2 then
pUnit:RegisterEvent('spell2_18506', 1, 1)
end
end

function mob18506_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18506', math.random(1500, 3000), 1)
end

function mob18506_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18506_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18506_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18506, 1, 'mob18506_Action')
RegisterUnitEvent(18506, 2, 'mob18506_Leave')
RegisterUnitEvent(18506, 3, 'mob18506_Kill')
RegisterUnitEvent(18506, 4, 'mob18506_Die')
